package com.sunxueqi.project.monitor.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sunxueqi.framework.web.controller.BaseController;
import com.sunxueqi.framework.web.vo.ResponseData;
import com.sunxueqi.project.monitor.service.IServerService;

import io.swagger.annotations.Api;

/**
 * 服务器监控
 * @author Sun
 *
 */
@Api(tags="服务器监控")
@RestController
@RequestMapping("/monitor/server")
public class ServerController extends BaseController {

	@Autowired
	private IServerService serverService;
	
	/**
	 * 获取服务器信息
	 * @param systemInfo
	 * @return
	 */
	@GetMapping("/list")
	public ResponseData list() throws Exception{
		//Map<String, Object> map = serverService.getServerInfo();
		return ResponseData.success(serverService.getServerInfo());
	}
}
